package com.bci.pwtz.mysql.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bci.pwtz.mysql.model.Pdbyq;

public interface PdbyqMapper {
    int deleteByPrimaryKey(String deviceid);

    int insert(Pdbyq record);

    int insertSelective(Pdbyq record);

    Pdbyq selectByPrimaryKey(String deviceid);

    int updateByPrimaryKeySelective(Pdbyq record);

    int updateByPrimaryKey(Pdbyq record);
    
    int deleteById(@Param("deviceid")String deviceid,@Param("lastmodifiedtime")Date time);
    
    List<Pdbyq> selectDeviceList(@Param("name") String name,@Param("companyid") Long companyid,@Param("companyids")String[] companyids,@Param("portalType") int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("beginTime") String beginTime,@Param("endTime") String endTime,
            @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    int selectDeviceCount(@Param("name") String name,@Param("companyid") Long companyid,@Param("companyids")String[] companyids,@Param("portalType") int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
    
    List<Pdbyq> getDeviceList(@Param("stationcode")String stationcode,@Param("stationdevicetype")int stationdevicetype,@Param("devicename")String devicename,@Param("companyid")Long companyid,@Param("beginIndex")int beginIndex,@Param("pagesize")int pagesize);
    
    int getDeviceCount(@Param("stationcode")String stationcode,@Param("stationdevicetype")int stationdevicetype,@Param("devicename")String devicename,@Param("companyid")Long companyid);
    
    int updateLastSyncDevice(@Param("companyId")Long companyId,@Param("lastSyncTime")String lastSyncTime);
}